<?php

namespace partner\functions\wechat\lib\SaleInfo;


use partner\functions\wechat\lib\BaseWechatPartner;
use Exception;

class WebInfo extends BaseWechatPartner
{
    // 互联网网站域名
    public $domain = '';

    // 网站授权函
    public $web_authorisation = '';

    // 互联网网站对应的商家APPID
    public $web_appid = '';

    public function setDomain(string $domain = "")
    {
        if (empty($domain))
            throw new Exception("域名不能为空");

        $this->domain = $domain;
        return $this;
    }

    public function setWebAuthorisation(string $web_authorisation = "")
    {
        $this->web_authorisation = $web_authorisation;
        return $this;
    }

    public function setWebAppId(array $web_appid = [])
    {
        $this->web_appid = $web_appid;
        return $this;
    }
}